<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CrearTablaPotreros extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create("potreros",function($tabla){
		$tabla->increments('id');
		$tabla->string('cod_potrero',45);
		$tabla->text('descripcion');
		$tabla->boolean('activo');
		$tabla->timestamps();
		});
		Schema::create("ganados_potreros",function($tabla){
		$tabla->increments('id');
		$tabla->string('id_potrero',45);
		$tabla->string('id_ganado',45);
		$tabla->string('fecha',45)->default('0000-00-00');
		$tabla->boolean('activo');
		$tabla->timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop("potreros");
		Schema::drop("ganados_potreros");	
	}

}
